package com.mt.edu.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 类名称：CourseAttachment <br>
 * 类描述： 每个课程包含的附件<br>
 * 创建人： 马腾 <br>
 * 创建时间：Apr 28, 2014 8:46:38 PM <br>
 * 修改人： 马腾 <br>
 * 修改时间：Apr 28, 2014 8:46:38 PM <br>
 */
@Entity
@Table(name="OL_COURSE_ATTACHMENT")
public class CourseAttachment implements Serializable {

	private static final long serialVersionUID = 5089009029341725897L;
	
	private String id;
	private String name;
	private String type;
	private String path;
	private Course course;
	private Date createDt;
	private Date updateDt; 
	private String operator;
	
	@Id
	@Column(name = "ATTACHMENT_ID")
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	
	@Column(name = "ATTACHMENT_NAME")
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	@Column(name = "ATTACHMENT_TYPE")
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	
	@Column(name = "ATTACHMENT_PATH")
	public String getPath() {
		return path;
	}
	public void setPath(String path) {
		this.path = path;
	}
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="COURSES_ID")
	public Course getCourse() {
		return course;
	}
	public void setCourse(Course course) {
		this.course = course;
	}
	
	@Column(name = "CREATE_DT")
	public Date getCreateDt() {
		return createDt;
	}
	public void setCreateDt(Date createDt) {
		this.createDt = createDt;
	}
	
	@Column(name = "UPDTE_DT")
	public Date getUpdateDt() {
		return updateDt;
	}
	public void setUpdateDt(Date updateDt) {
		this.updateDt = updateDt;
	}
	
	@Column(name = "OPERATOR")
	public String getOperator() {
		return operator;
	}
	public void setOperator(String operator) {
		this.operator = operator;
	}
}
